GetColorDialogColor
Color = GetColorDialogColor(Index)
 
Parameters:

    Index=the index of the custom color (1-16)
Returns:

    Color=the color of the given index
 

     GetColorDialogColor returns the custom color of one of the 16 slots of the Color Dialog.




FACTS:


      * The colors are returned in RGB format, so use can use the RGB() function.




Mini Tutorial:


     


  
; Include the Dialogs library in this program
  #Include "PBDialogs2"
  
  
; Init the Colour Palette of the Colour Dialog
  For lp=0 To 16
     ColorDialogColor(lp,RndRGB())
  Next
  
; Open the Colour Selection Dialog
  ThisColour=ColorDialog(RGB(255,255,255))
  
  If ThisColour<>-1
     
   ; Display message
     CenterText 400,180,"Here's your colour"
     BoxC 300,200,500,400,true,ThisColour
     
  Else
     CenterText 400,180,"You Pressed Cancel"
     
  EndIf
  
  
  // Display the screen & wait for a key press to end
  Sync
  WaitKeykey
  





 
Related Info: ColorDialog | ColorDialogColor | RGB :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com